var path = require("src/path/path");

// 格式化路径
console.log('normalization : ' + path.normalize('/test/test1//2slashes/1slash/tab/..'));

// 连接路径
console.log('joint path : ' + path.join('/test', 'test1', '2slashes/1slash', 'tab', '..'));

// 转换为绝对路径
console.log('resolve : ' + path.resolve('public/upload/'));

// 路径中文件的后缀名
console.log('ext name : ' + path.extname('main.js'));

var a = path.basename('/foo/bar/baz/asdf/quux.html')
console.log(a)
// return 'quux.html'

a = path.basename('/foo/bar/baz/asdf/quux.html', '.html')
console.log(a)
// return 'quux'

a = path.basename('/foo/bar/baz/asdf/', '.html')
console.log(a)
// return 'asdf'
